package org.lpw.wormhole.queue;

import org.lpw.wormhole.util.Kit;

/**
 * @author lpw
 */
public class QueueFactoryImpl
    implements QueueFactory
{
    protected final LocalQueue localQueue;
    protected final RemoteQueue remoteQueue;
    protected final Queue queue;

    public QueueFactoryImpl(Kit kit)
    {
        localQueue = new LocalQueueImpl(kit);
        remoteQueue = new RemoteQueueImpl(kit);
        queue = new QueueImpl(kit, localQueue, remoteQueue);
    }

    @Override
    public Queue getQueue()
    {
        return queue;
    }

    @Override
    public LocalQueue getLocalQueue()
    {
        return localQueue;
    }

    @Override
    public RemoteQueue getRemoteQueue()
    {
        return remoteQueue;
    }
}
